<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-errorcode-add">
			<input id="apiProjectnameId" name="projectId" type="hidden" th:value="${project.apiProjectnameId}"   />
			<div class="form-group">
				<label class="col-sm-3 control-label">所属项目：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" id="treeName" readonly="true" th:value="${project.description}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">返回值json：</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="20" name="paramJson" id="paramJson"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">忽略分页信息：</label>
				<div class="col-sm-8">
					<div class="onoffswitch">
						<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="ignorePageInfo" name="ignorePageInfo">
						<label class="onoffswitch-label" for="ignorePageInfo">
							<span class="onoffswitch-inner"></span>
							<span class="onoffswitch-switch"></span>
						</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/response"
		$("#form-errorcode-add").validate({
			rules:{
				paramJson:{
                    required:true
				}
			},
			submitHandler: function(form) {
                var data = $('#form-errorcode-add').serialize();
                console.log(data);
                $.operate.save(prefix + "/add", data);

			}
		});
	</script>
</body>
</html>
